dnl Process this file with autoconf to produce a configure script.

AC_INIT([mtag], [0.5], [ananasik@gmail.com], [mtag])
AC_CONFIG_AUX_DIR([build])

AM_INIT_AUTOMAKE(1.11 foreign dist-xz no-dist-gzip)
AM_SILENT_RULES([yes])

AC_CONFIG_HEADER(config.h)
AC_CONFIG_SRCDIR([.])

AC_CONFIG_MACRO_DIR([m4])

AM_MAINTAINER_MODE

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC

AM_PROG_CC_C_O

PKG_CHECK_MODULES([MTAG], [glib-2.0 taglib_c])
AC_SUBST([MTAG_CFLAGS])
AC_SUBST([MTAG_LIBS])

AC_PATH_PROG([BASH], [bash])
AC_SUBST([BASH])

AC_PATH_PROG([DIALOG], [dialog])
AC_SUBST([DIALOG])
AM_CONDITIONAL([DIALOG], [test x$DIALOG != x])

AC_PATH_PROG([YAD], [yad])
AC_SUBST([YAD])
AM_CONDITIONAL([YAD], [test x$YAD != x])

IT_PROG_INTLTOOL([0.40.0])

GETTEXT_PACKAGE=mtag
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])

AM_GLIB_GNU_GETTEXT

AC_CONFIG_LINKS([
mtag-recode.sh:mtag-recode.in
mtag-rename.sh:mtag-rename.in
mtag-editor.sh:mtag-editor.in
mtag-xeditor.sh:mtag-xeditor.in
])

AC_OUTPUT([
po/Makefile.in
Makefile
mtag-editor
mtag-xeditor
mtag-recode
mtag-rename
])
